﻿
IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'P_GetUserByIdentificationCredentials')
	BEGIN
		DROP  Procedure [esf_sso].P_GetUserByIdentificationCredentials
	END

GO

-- [esf_sso].P_GetUserByIdentificationCredentials 1, '80093116', 'megaman'

CREATE Procedure [esf_sso].P_GetUserByIdentificationCredentials
	@pIdentificationTypeID	BIGINT
	,@pIdentificationNumber	VARCHAR (20)
	,@pPassword VARCHAR (160)
AS
	
	SELECT 
		VU.*
	FROM
		[esf_sso].VUser VU
	WHERE
		VU.Usr_Per_IT_ID = @pIdentificationTypeID
		AND VU.Usr_Per_IdentificationNumber = @pIdentificationNumber
		AND VU.Usr_Password = @pPassword
GO